import pandas as pd
feat_cols = ['bedrooms', 'bathrooms', 'sqft_living', 'sqft_lot', 'sqft_above', 'sqft_basement']

# enumerate 会把数组变成[(0,"a"),(1,"b")]的形式 tuple
for e in enumerate(feat_cols):
    print(e)
print("-----------")
for i, e in enumerate(feat_cols):
    print(i)
    print(e)

feat_cols = feat_cols[0]
print(feat_cols)
print("=================================")
v = [[53,'女','赵'],[64,'男','田'],[72,'男','孙'],[82,'女','李']]
i = ['1号','2号','3号','4号']
c = ['年龄','性别','姓氏']
df = pd.DataFrame(v,index=i,columns=c)
# t1 = df.loc[df.index,['年龄','姓氏']]
t1 = df[['年龄','姓氏']]
print(t1,type(t1))
print(t1.index, type(t1.index))
print(t1.values, type(t1.values))
print(t1.columns, type(t1.columns))
print("==================d=============")
t1 = df['性别']
print(t1,type(t1))
print(t1.index, type(t1.index))
print(t1.values, type(t1.values))
# print(t1.columns, type(t1.columns))
    














if __name__ == '__main__':
    pass